package ssh_util

import (
	"fmt"
	"github.com/melbahja/goph"
)

func main() {
	// 创建一个新的 SSH 客户端
	client, err := goph.New("username", "server-ip:22", goph.Password("password"))
	if err != nil {
		panic("Failed to create client: " + err.Error())
	}
	defer client.Close()

	// 执行远程命令
	output, err := client.Run("ls -l")
	if err != nil {
		panic("Failed to run command: " + err.Error())
	}

	fmt.Println(output)
}
